import "@babel/polyfill";
// import "@/libs/rem";

// 这里是调试入口

import Richbox from "./Richbox.vue";
import emoji from "./EmojiPicker.vue";

new Vue({
  el: "#app",
  components: { emoji, Richbox },
  methods: {
    emotionTab(emotions, emotionEl) {
      console.log(emotions);
      this.$refs.richbox.insertElement(emotionEl);
    },
    menuChange(menu) {
      this.$refs.richbox.restoreRange();
    },
    getContent() {
      var result = this.$refs.richbox.getContent();
      console.log(result);
    },
    getHtmlContent() {
      var result = this.$refs.richbox.getHtmlContent();
      console.log(result);
    },
    setContent() {
      const content = document.getElementById("contentIpt").value;
      this.$refs.richbox.setContent(content);
    }
  }
});
